A redo log (redo log) is an important guarantee of data reliability in a database operation, and can provide more data security protection than a file system. A basic principle of the redo log is as follows: When a database modification operation is committed, data is not instantly written to a data file on a magnetic disk, but is saved in a memory, which avoids writing a database update requirement to the data file each time, and therefore improves database update performance; redo data (redo data) is generated according to the modification operation, and is written to the magnetic disk as a redo log, avoiding a data loss caused by a memory data loss in the case of a failure. When a failure occurs during a database operation, data may be restored by using a persistent redo log.
In most existing database applications, to improve concurrent throughput performance of a system, a database provides an access manner of multithread concurrent processing. Although multiple threads may gain access to the database concurrently, before multiple pieces of redo data are written to a magnetic disk, the multiple pieces of redo data need to be temporarily stored in a redo queue (redo queue) and then successively written to the magnetic disk, so as to improve efficiency of writing the magnetic disk. Redo data has a time sequence limitation; therefore, when multiple threads copy redo data to a redo queue, it is required to ensure a time sequence within a protection scope of a global redo queue lock. That is, for redo data writing each time, time-consuming data copying needs to be performed after the redo queue lock is preempted.
In the prior art, multiple threads can generate and copy redo data only in a serial manner, which therefore contains a defect of low redo data processing efficiency, affecting a system throughput in application of concurrent heavy service traffic.